package com.andnnl.random;

import cn.hutool.core.util.RandomUtil;
import com.xkzhangsan.time.calculator.DateTimeCalculatorUtil;

import java.util.Date;

/**
 * Created by chenss on 2021/4/1.
 */
public class RandomNameTest {
    public static void main(String[] args) {

        Long curMinLong = DateTimeCalculatorUtil.reduceAccuracyToMinute(new Date()).getTime();
        System.out.println(curMinLong);
        curMinLong=curMinLong-curMinLong%(10*60*1000);
        System.out.println(curMinLong);
        Date curMin =DateTimeCalculatorUtil.plusMinutes(new Date(curMinLong),-10);
        System.out.println(curMin);
        System.out.println(curMin.getTime());
        System.out.println(new Date(1623402600000L));
        System.out.println(new Date(1623402720000L));

        for (int i = 0; i < 2; i++) {
            System.out.print(RandomUtil.randomString(RandomUtil.BASE_CHAR,RandomUtil.randomInt(5,8)));
            System.out.print(RandomUtil.randomNumbers(RandomUtil.randomInt(2,8)));
//            System.out.print(RandomUtil.randomString(RandomUtil.randomInt(10,15)));
            System.out.print("\t");
            System.out.print(RandomUtil.randomString(RandomUtil.randomInt(10,15)));
            System.out.println();
        }
    }
}
